<?php

use Illuminate\Http\Request;
use App\Http\Middleware\CheckApiBuyer;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/


Route::namespace('Api')->group(function(){
	Route::any('login-do','LoginController@loginDo');
	Route::any('reg'     ,'LoginController@reg');
	Route::any('sendmsg' ,'LoginController@sendmsg');
	Route::get('platform','PlatformController@index');
	Route::get('banner',  'BannerController@index');
	Route::get('check-android-version','LoginController@checkAndrodVersion');
	Route::middleware('auth:api')->group(function(){
		Route::prefix('task')->group(function(){
			Route::get('list','TaskController@getList');	//任务大厅（首页）
			Route::get('wait','TaskController@getWait');    // 待完成任务

			Route::get('detail/{id}','TaskController@detail'); // 任务详情

			Route::get('get-task/{task_id}','TaskController@getTask');//领取任务

			Route::get('my-task','BuyerTaskController@myTask');// 我的任务

			Route::any('done-task','BuyerTaskController@doneTask');

			// 刷单详情
			Route::any('my-task-show','BuyerTaskController@show');

			// 取消订单
			Route::any('my-task-cancle','BuyerTaskController@cancle');


		});

		Route::prefix('withdraw')->group(function(){
			Route::get('list','WithdrawController@getList');	//提现记录
			Route::any('apply','WithdrawController@apply');	//提现申请 

			
		});	

		Route::prefix('user')->group(function(){
			Route::get('list','UserController@getList');	//提现记录
			Route::get('apply','UserController@apply');	//提现记录
			Route::any('save-account','UserController@saveAccount'); //保存账号
			Route::get('info','UserController@info');
		});

		Route::any('feedback','FeedbackController@save');

		// 推送的消息
		Route::get('pushmsg-list','WithdrawController@withdrawLog');
			
	});
	
});
